PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


DrawThemeWindowFrame

Draws a window frame.

pascal OSStatus DrawThemeWindowFrame (
                     ThemeWindowType flavor,
                     const Rect *contRect,
                     ThemeDrawState state,
                     const ThemeWindowMetrics *metrics,
                     ThemeWindowAttributes attributes,
                     WindowTitleDrawingUPP titleProc,
                     UInt32 titleData);
flavor
A value of type ThemeWindowType . Pass a constant specifying the type of window for which to draw a frame. See Theme Window Type Constants for descriptions of possible values.
contRect
A pointer to a structure of type Rect . Before calling DrawThemeWindowFrame , specify the rectangle for which you wish to draw a window frame, in coordinates local to the current port. This rectangle is typically the content rectangle of a window.
state
A value of type ThemeDrawState . Pass a constant--either kThemeStateActive or kThemeStateInactive --appropriate to the current state of the window. See Theme Draw State Constants for descriptions of these values.
metrics
A pointer to a structure of type ThemeWindowMetrics . Before calling DrawThemeWindowFrame , set the structure to describe the window for which to draw a frame.
attributes
A value of type ThemeWindowAttributes . Pass one or more constants corresponding to the window's current visual attributes. See Theme Window Attribute Constants for descriptions of possible values. Pass 0 if the window has none of the enumerated attributes.
titleProc
A value of type WindowTitleDrawingUPP . If you pass the value kThemeWindowHasTitleText in the attributes parameter, you should pass a universal procedure pointer to an application-defined function such as that described in MyWindowTitleDrawingProc in the titleProc parameter. DrawThemeWindowFrame calls that function to draw the window's title. Pass NULL if there is no title to be drawn.
titleData
An unsigned 32-bit integer. Provide any data to be passed in to the userData parameter of the callback function specified in the titleProc parameter.
function result
A result code; see Result Codes .
DISCUSSION

The DrawThemeWindowFrame function draws a window frame appropriate to the specified window type. You may use DrawThemeWindowFrame to make a custom window theme-compliant.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)